<?php

class Admin_Form_Language extends Zend_Form
{

    public function init()
    {
		$this->setName("Languages");
		
		$languageId = new Zend_Form_Element_Hidden("languageId");
		$languageId->addFilter("int");
		
		$languageName = new Zend_Form_Element_Text("languageName");
		$languageName->setLabel("Language Name")
					 ->setRequired(true)
					 ->setAttrib("maxlength", "100")
					 ->setAttrib("size", "40")
					 ->addFilter("StripTags")
					 ->addFilter("StringTrim")
					 ->addValidator("NotEmpty");
					 
		$languageIsActive = new Zend_Form_Element_CheckBox("languageIsActive");
		$languageIsActive->setLabel("Language is active")
					 ->setUncheckedValue("N")
					 ->setCheckedValue("Y")
					 ->setValue("Y");
		$languageIsShowInSourceList = new Zend_Form_Element_CheckBox("languageIsShowInSourceList");
		$languageIsShowInSourceList->setLabel("Present in Source List")
					 ->setUncheckedValue("N")
					 ->setCheckedValue("Y")
					 ->setValue("Y");
		$languageIsShowInTargetList = new Zend_Form_Element_CheckBox("languageIsShowInTargetList");
		$languageIsShowInTargetList->setLabel("Present in Target List")
					 ->setUncheckedValue("N")
					 ->setCheckedValue("Y")
					 ->setValue("Y");
		$languageIsshowInTranslatorlist = new Zend_Form_Element_CheckBox("languageIsshowInTranslatorlist");
		$languageIsshowInTranslatorlist->setLabel("Present in Translation List")
					 ->setUncheckedValue("N")
					 ->setCheckedValue("Y")
					 ->setValue("Y");					
		
		$submit = new Zend_Form_Element_Submit("submit");
		$submit->setAttrib("id","submitbutton")
			   ->setAttrib("style","width:80px");
		
		$hash = new Zend_Form_Element_Hash('hash', 'no_csrf_foo', array('salt' => '~!@#$%^&*D@ngha123456')); 
		$hash->setDecorators(array( 
                     array('ViewHelper', array('helper' => 'formHidden')) 
                 ));
		
		$this->addElements(array($languageName, $languageIsActive, $languageIsShowInSourceList, $languageIsShowInTargetList, $languageIsshowInTranslatorlist, $submit, $languageId, $hash));
    }
}
?>

